class CreateCarts < ActiveRecord::Migration
  def change
    create_table :carts do |t|
	  t.references :user
	  t.string "image", :limit => 60
	  t.string "name", :limit => 40
	  t.string "email", :limit => 30
	  t.date "time"
	  t.column :available,'integer unsigned', :limit => 6
	  t.column :buy,'integer unsigned', :limit => 6
	  t.column :price,'integer unsigned', :limit => 10
      t.timestamps
    end
	add_index("carts", "user_id")
  end
end
